package com.qf.shopping.dao.impl;

import com.qf.shopping.dao.IAddressDao;
import com.qf.shopping.entity.Address;
import com.qf.shopping.utils.Tools;

import java.util.List;

/**
 * @author 三旬
 * @version 1.0  2022/9/23
 */

public class AddressDaoImpl implements IAddressDao {

    @Override
    public Integer insert(Address address) {
        return null;
    }

    @Override
    public Integer deleteById(Integer id) {
        return null;
    }

    @Override
    public Integer updateById(Address address) {
        return null;
    }

    @Override
    public Address selectOneById(Integer id) {
        String sql = "select *from t_address where id = ?";
        return Tools.selectOne(sql,Address.class,id);
    }

    @Override
    public List<Address> selectAll() {
        return null;
    }

    @Override
    public List<Address> selectPage(Integer index, Integer size) {
        return null;
    }

    @Override
    public Integer counts() {
        return null;
    }

    @Override
    public List<Address> getMyAddress(Integer uid) {
        String sql = "select* from t_address where uid = ? ORDER BY statu desc";
        return Tools.selectList(sql,Address.class,uid);
    }
}
